package com.pj.lib.auraServer.app.properties;

import java.util.Map;

import com.pj.lib.auraServer.components.DB.PostgresDB;

public class DBProperties implements Properties{

	public static final String KEY_DB_TYPE = "db_type";
	public static final String KEY_USER = "user";
    public static final String KEY_PASS = "password";
    public static final String KEY_SSL = "ssl";
    public static final String KEY_URL = "url";
    public static final String KEY_PORT = "port";
    public static final String KEY_SCHEMA = "schema";
    
    
	
    public String DB_TYPE;
	public String USER;
	public String PASS;
	public String URL;
	public String PORT;
	public String SCHEMA;
	public String SSL;
	

	@Override
	public void getSettingsFromFile(String fileName) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void getSettingsFromMap(Map map) {
		DB_TYPE = (String) map.get(KEY_DB_TYPE);
		PASS= (String) map.get(KEY_PASS);
		PORT= (String) map.get(KEY_PORT);
		SCHEMA= (String) map.get(KEY_SCHEMA);
		SSL= (String) map.get(KEY_SSL);
		URL= (String) map.get(KEY_URL);
		USER= (String) map.get(KEY_USER);
	}

	@Override
	public void getSettingsFromProperties(java.util.Properties props) {
		DB_TYPE = props.getProperty(KEY_DB_TYPE);
		USER = props.getProperty(KEY_USER);
		PASS = props.getProperty(KEY_PASS);
		URL = props.getProperty(KEY_URL);
		PORT = props.getProperty(KEY_PORT);
		SCHEMA = props.getProperty(KEY_SCHEMA);
		SSL = props.getProperty(KEY_SSL);
		
	}

}
